Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
doublylinked
Advanced tools
Doubly linked list implementation for JavaScript with iterator and array-like interface
Doubly linked list implementation for JavaScript with iterator and array-like interface
$ npm install doublylinked [--save]
const list = new DoublyLinked([element1[, ..[, elementN]]]);
DoublyLinked.prototype.concat()
DoublyLinked.prototype.entries()
DoublyLinked.prototype.every()
DoublyLinked.prototype.everyRight()
DoublyLinked.prototype.filter()
DoublyLinked.prototype.find()
DoublyLinked.prototype.forEach()
DoublyLinked.prototype.forEachRight()
DoublyLinked.prototype.includes()
DoublyLinked.prototype.insert()
DoublyLinked.prototype.join()
DoublyLinked.prototype.map()
DoublyLinked.prototype.next()
DoublyLinked.prototype.prev()
DoublyLinked.prototype.pop()
DoublyLinked.prototype.push()
DoublyLinked.prototype.reduce()
DoublyLinked.prototype.reduce()
DoublyLinked.prototype.reduceRight()
DoublyLinked.prototype.remove()
DoublyLinked.prototype.reset()
DoublyLinked.prototype.reverse()
DoublyLinked.prototype.shift()
DoublyLinked.prototype.some()
DoublyLinked.prototype.someRight()
DoublyLinked.prototype.toArray()
DoublyLinked.prototype.toString()
DoublyLinked.prototype.unshift()
DoublyLinked.prototype[@@iterator]
Merges cursor list with and given lists/values into new list.
list.concat(otherList1[, element1[, ...[otherList2]]])
valueN : Lists and/or values to concatenate into a new list
Return value : A new DoublyLinked instance
Returns the iterator object contains entries
list.entries()
Tests whether all elements in the list pass the test implemented by the provided function (from left to right)
list.every(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
currentValue : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : true if the callback function returns a truthy value for every list element; otherwise, false
Tests whether all elements in the list pass the test implemented by the provided function (from right to left)
list.everyRight(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
currentValue : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : true if the callback function returns a truthy value for every list element; otherwise, false
Creates a new list with all elements that pass the test implemented by the provided function
list.filter(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
element : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : A new list with the elements that pass the test
Returns the value of the first element in the list that satisfies the provided testing function. Otherwise undefined is returned
list.find(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
element : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : A value in the list if an element passes the test; otherwise, undefined
Executes a provided function once for each list element (from left to right)
list.forEach(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
element : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : Value to use as this when executing callback
Executes a provided function once for each list element (from right to left)
list.forEachRight(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
element : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : Value to use as this when executing callback
Determines whether an list includes a certain element, returning true or false as appropriate
list.includes(searchElement[, fromIndex])
searchElement : The element to search for
fromIndex : The position in this list at which to begin searching for searchElement. A negative value searches from the index of list.length + fromIndex by asc. Defaults to 0.
Return value : true if the searchElement found in the list; otherwise, false
Adds one or more elements right after the cursor node of the list and returns the new length of the list
list.insert(element1[, ...[, elementN]])
elementN : The elements to add right after the cursor
Return value : The new length of the list
Adds one or more elements right after the cursor node of the list and returns the new length of the list
list.join([separator])
separator : Specifies a string to separate each pair of adjacent elements of the list
Return value : A string with all list elements joined. If length is 0, the empty string is returned
Creates a new list with the results of calling a provided function on every element in the calling list
list.map(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
currentValue : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : A new list with each element being the result of the callback function
Moves cursor to the next and returns its value
list.next()
Moves cursor to the previous and returns its value
list.prev()
Removes the last element from the list and returns that element
list.pop()
Adds one or more elements to the end of the list and returns the new length of the list
list.push(element1[, ...[, elementN]])
elementN : The elements to add to the end of the list
Return value : The new length of the list
Applies a function against an accumulator and each element in the list (from left-to-right) to reduce it to a single value
list.reduce(callback[, initialValue])
callback : Function to test for each element, taking three arguments:
accumulator : The accumulator accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied.
currentValue : The current element being processed in the list
currentIndex : The index of the current element being processed in the list
list : The list every was called upon
initialValue : Value to use as the first argument to the first call of the callback
Return value : The value that results from the reduction
Applies a function against an accumulator and each element in the list (from right-to-left) to reduce it to a single value
list.reduceRight(callback[, initialValue])
callback : Function to test for each element, taking three arguments:
accumulator : The accumulator accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied.
currentValue : The current element being processed in the list
currentIndex : The index of the current element being processed in the list
list : The list every was called upon
initialValue : Value to use as the first argument to the first call of the callback
Return value : The value that results from the reduction
Resets cursor to head
list.reset()
Reverses a list in place. The first array element becomes the last, and the last list element becomes the first
list.reverse()
Removes the first element from the list and returns that element
list.shift()
Tests whether all elements in the list pass the test implemented by the provided function (from left to right)
list.some(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
currentValue : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : Value to use as this when executing callback
Tests whether all elements in the list pass the test implemented by the provided function (from right to left)
list.someRight(callback[, thisArg])
callback : Function to test for each element, taking three arguments:
currentValue : The current element being processed in the list
index : The index of the current element being processed in the list
list : The list every was called upon
thisArg : Value to use as this when executing callback
Return value : Value to use as this when executing callback
Returns a new array containing elements of the list
list.toArray()
Returns a string representing the specified list and its elements
list.toString()
Adds one or more elements to the beginning of the list the new length of the list
list.unshift(element1[, ...[, elementN]])
elementN : The elements to add to the front of the list
Return value : The new length of the list
Returns the iterator object contains entries
const iterator = list[Symbol.iterator]()
for (const val in list) {
...
}
Returns current located node of the list
Returns first node of the list
Returns the element count of the list
Returns last node of the list
>= 6.0
;FAQs
Doubly linked list implementation for JavaScript with iterator and array-like interface
The npm package doublylinked receives a total of 24,673 weekly downloads. As such, doublylinked popularity was classified as popular.
We found that doublylinked demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.